package com.hn.hnspringbootdemo.entity;

public class Result<T extends ResultResponseRetInfo> {

    public Result(ResultResponseErrorInfo errorInfo, T retInfo) {
        ResultResponse<T> r = new ResultResponse<T>();
        r.setErrorInfo(errorInfo);
        r.setRetInfo(retInfo);
        this.setResponse(r);
    }

    public ResultResponse<T> response;

    /**
     * Gets the value of response.
     *
     * @return the value of response
     */
    public ResultResponse<T> getResponse() {
        return response;
    }

    /**
     * Sets the response.
     *
     * <p>You can use getResponse() to get the value of response</p>
     *
     * @param response response
     */
    private void setResponse(ResultResponse<T> response) {
        this.response = response;
    }
}
